<!--
 * @Author: chenxuan
 * @Date: 2022-11-28 13:53:12
 * @LastEditTime: 2023-01-05 14:05:01
 * @LastEditors: chenxuan
-->
<template>
    <el-dialog
        :title="title"
        :visible.sync="dialogVisible"
        width="340px"
        v-dialogDrag
        >
        <slot name="msg"></slot>
        <span slot="footer">
            <el-button size="medium" type="primary" @click="ok">确 定</el-button>
            <el-button size="medium" @click="cancel">取 消</el-button>
        </span>
    </el-dialog>
</template>
<script>
  import {msg_successCancel} from '@/assets/js/common'
  export default {
    data() {
      return {
        dialogVisible: false
      };
    },
    props:{
        title:{
            type:String,
            default: "请您确认"
        }
    },
    methods: {
        switchDialog:function(val){
            this.dialogVisible=val
        },
        cancel:function(){
             this.dialogVisible=false;
             msg_successCancel();
        },
        ok:function(){
            this.$emit('ok');
        }
    }
  };
</script>
